package com.wwx.validator.annotation;

import com.wwx.validator.GenderValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Gender
 *
 * @author 王伟欣
 * @version V1.0
 * @email w17731138318@126.com
 * @creator 2023-02-11 11:33
 * @company 晶品科技
 * @copyright 晶品科技 · 石家庄 · 技术二部
 */
@Target({METHOD,FIELD})
@Retention(RUNTIME)
@Constraint(validatedBy = GenderValidator.class)
@Documented
public @interface Gender {
	String message() default "性别为男或者女";

	Class<?>[] groups() default {};

	Class<? extends Payload[]>[] payload() default {};
}
